From 7deaedc301dc160286fed8d2ffa298ba454ca79e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 14 Oct 2013 16:01:49 +0100 Subject: [PATCH] xl: remove needless error checking from calls to xl_fork xl_fork cannot fail - it exits instead. Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- tools/libxl/xl_cmdimpl.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 8990020a80..e19b1cfc90 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -230,10 +230,7 @@ static void autoconnect_vncviewer(uint32_t domid, int autopass) vncviewer_child_report(); pid_t pid = xl_fork(child_vncviewer); - if (pid < 0) { - perror("unable to fork vncviewer"); - return; - } else if (pid > 0) + if (pid) return; postfork(); @@ -2009,10 +2006,7 @@ static void autoconnect_console(libxl_ctx *ctx_ignored, console_child_report(); pid_t pid = xl_fork(child_console); - if (pid < 0) { - perror("unable to fork xenconsole"); - return; - } else if (pid > 0) + if (pid) return; postfork(); -- 2.30.2